import Vue from 'vue'
import "@/styles/reset.css"
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import './assets/theme/index.css'
import '@/styles/index.scss' // global css
import realImg from  './directive/real-img';
import customScroll from  './directive/custom-scroll';
import debounce from  './directive/debounce';
import requestStatusMixin from "./components/mixin/requestStatus"
import permission from './directive/permission'
import * as utils from "./utils/index";
import dayjs from 'dayjs';
import * as echarts from 'echarts'
import App from './App'
import store from './store'
import router from './router'

import '@/icons' // icon
import '@/permission' // permission control
import { selectDictLabel, parseTime,} from '@/utils'
import {getUserToken} from "@/api/statistics";

import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/css/swiper.css'
import "@wangeditor/editor/dist/css/style.css";
Vue.use(VueAwesomeSwiper);
Vue.mixin(requestStatusMixin); // 将混入组件添加到Vue实例的全局混入中
Vue.use(ElementUI);
Vue.use(permission);
Vue.use(realImg);
Vue.use(customScroll);
Vue.use(debounce);

Vue.prototype.dayjs = dayjs;
Vue.prototype.$utils = utils; //公用方法
Vue.prototype.$await = utils.handlePromise; // 处理promise
Vue.prototype.$echarts = echarts;

Vue.prototype.selectDictLabel = selectDictLabel;
Vue.prototype.parseTime = parseTime;
Vue.prototype.$requestStatusMixin = requestStatusMixin;
Vue.config.productionTip = false;

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
